ParcelLabel API

(2 reviews)

Create Label(s) - Domestic Oversized by Fliway

How to generate parcel labels for parcels using Fliway service

When generating parcel labels for packages using Fliway service, merchants are able to place Fliway jobs through our NZ Post API suite. Fliway will perform the delivery.

Fliway service needs to be enabled by NZ Post before a merchant can use the service. Please contact your NZ Post account manager to activate the service you require.

Resource URL

UAT:

https://api.uat.nzpost.co.nz/parcellabel/v3/labels

Production:

https://api.nzpost.co.nz/parcellabel/v3/labels

A unique consignment_id is returned once the details of the request are stored in the labeling database. One or multiple labels can be generated within a consignment (for Fliway Courier only), connote id for Fliway is generated as part of tracking numbers following the pattern NZP[0-9]{9}.

Request Parameters

For each of these services, the parameter requirements are similar but each service has slightly different requirements and needs to use the relevant service code. In the following table, we have provided which fields are required in the label request for a particular service.

Code samples for each of these separate service types are displayed further down this page.

Field NameDescriptionRequired for Courier?
carrierCarrier of the parcel. Value must be FLIWAYYes - Fliway
orientationPrint orientation of the label. Value must be PORTRAIT or LANDSCAPE. Default value is LANDSCAPE.No
logo_idUnique identifier for merchants logo. The field is only relevant for Courier servicesNo
formatFormat of the label. Value must be PDF or PNG. Default Value is PDF.No
despatch_dateDate for despatching the parcels. Value format must be "yyyy-MM-dd'T'HH:mm:ss".Yes
notification_endpointMerchants Webhook URL to receive notification when the label has been generated.No
sender_reference_1Sender's reference for the consignment. Will be printed on the label.No
sender_reference_2Sender's reference. Will be printed on the InvoiceNo
account_numberYour NZ Post Billing Account number (9 or 5 series).This is highly recommended to pass in the API call to obtain your account rates.No
label_dimensionsAn object specifying the label dimensions (in mm) upon which to print the label. If you are passing this object then the value should be 150x100 or 174x100 or empty string. If it is empty then default value is 174x100. This field is only mandatory to generate 150x100 dimensions label.No
paper_dimensionsAn object containing the paper size upon which to print the label. See Paper Dimension Object Parameters belowNo
paper_dimensions.width_cmWidth the label to be printed to. Default value is 17.4. Note: To print on a 150x100 label this value must be set to ‘15.0’No
paper_dimensions.height_cmHeight of the label to be printed to. Default value is 10No
paper_dimensions.stationery_sizePaper size upon which to print the label. Must be A4 or A5.No
sender_detailsAn object containing the sender contact details. See Sender Details Object Parameters below.Yes
sender_details.nameName of the senderYes
sender_details.phonePhone number of the sender. NO SPACES, DIGITS and '+' ONLYYes
sender_details.emailEmail address of the sender.Yes
sender_details.signatoryName of the individual sending the parcel, this is used for customs purposes.No
sender_details.company_nameCompany name of the sender.No
sender_details.site_codeSite code assigned to the address where the parcel will be picked up by the courier. This address is also used for the NZ Post manifest process.Yes
sender_details.customs_codeCustoms code of the sender.No
receiver_detailsAn object containing the receiver contact details. See Receiver Details Object Parameters belowYes
receiver_details.nameName of the receiverYes
receiver_details.phonePhone number of the receiver. NO SPACES, DIGITS and '+' ONLYYes
receiver_details.emailEmail address of the receiver.Yes
receiver_details.vat_numberThe VAT or GST number of the receiver. The field should not be > 14 characters.No
receiver_details.registration_numberRegistration number of the receiver required for Delivery Location Options.No
pickup_addressAn object containing the sender pickup address details. See Pickup Address Rules and Parameters belowYes (NB: this is used as the NZ return address for this service)
pickup_address RulesOnly one of the following is required:
address_id (highly desirable)
OR
dpid(highly desirable)
OR
site_code (highly desirable)
OR
street, suburb, city, and postcode. Use the city for addresses without suburbs.
Address_id and dpid can be obtained using ParcelAddress API. Account managers set up site codes.
pickup_address.address_idAddress ID for the pickup address sourced from the ParcelAddress APISee pickup_address rules
pickup_address.dpidDelivery Point ID for the pickup address sourced from the ParcelAddress APISee pickup_address rules
pickup_address.site_codeSite code of pickup address. Setup by Account ManagerSee pickup_address rules
pickup_address.company_nameCompany name of the pickup addressNo
pickup_address.building_nameBuilding name of the pickup address.No
pickup_address.streetStreet name of the pickup address.See pickup_address rules
pickup_address.suburbSuburb of the pickup addressSee pickup_address rules
pickup_address.cityCity of the pickup addressSee pickup_address rules
pickup_address.postcodePostal or zip code of the pickup address.See pickup_address rules
pickup_address.stateRegional, provincial or county name of the pickup address.No
pickup_address.unit_typeType of unit (if applicable) of the pickup address.No
pickup_address.unit_valueValue of the unit type.Yes if pickup_address.unit_type is not blank
pickup_address.floorFloor of the pickup address.No
pickup_address.country_codeTwo character country code of the pickup address.No (this must be set to NZ if has value)
pickup_address.instructionsPickup instructions for courierNo
delivery_addressAn object containing the receiver delivery address details. See Receiver Address Object Parameters sectionYes
delivery_address Rulescountry_code (mandatory) AND only one of the following is required:
address_id (highly desirable)
OR
dpid(highly desirable)
OR
site_code (highly desirable)
OR
street, suburb, city, and postcode. Use the city for addresses without suburbs.
Address_id and dpid can be obtained using ParcelAddress API. Account managers set up site codes.
delivery_address.address_idAddress ID for the delivery address sourced from the ParcelAddress APISee delivery_address rules
delivery_address.dpidDelivery Point ID for the delivery address sourced from the ParcelAddress APISee delivery_address rules
delivery_address.site_codeSite code of the pickup address.See delivery_address rules
delivery_address.building_nameBuilding name of the delivery address.No
delivery_address.company_nameName of company that the parcel is being delivered to.No
delivery_address.street_numberStreet number of the delivery address.No but highly desirable
delivery_address.streetStreet name of the delivery address.See delivery_address rules
delivery_address.suburbSuburb of the delivery addressSee delivery_address rules
delivery_address.cityCity of the delivery addressSee delivery_address rules
delivery_address.stateState of the delivery addressNo
delivery_address.country_codeTwo character country code of the delivery address.Yes (this must be set to NZ)
delivery_address.postcodePostal or zip code of the delivery address.See delivery_address rules
delivery_address.unit_typeType of unit (if applicable) of the pickup address.No
delivery_address.unit_valueValue of the unit type.Yes if delivery_address.unit_type is not blank
delivery_address.floorFloor of the pickup address.No
delivery_address.instructionsDelivery instructions for courierNo
parcel_detailsAn object containing the label details for each label in the consignment. See Parcel Details Object Parameters sectionYes
parcel_details.service_codeCode to represent a delivery service. Value must be FLWYYes
parcel_details.add_onsArray of ancillary codes. Please refer to the Add ons section below for further details. All addons must be the same for each parcel.No
parcel_details.return_indicatorIndications if the label is used for returning items. Values must be OUTBOUND or RETURN, and the same for each parcel.Yes
parcel_details.descriptionThe box size name on the label for the dispatching person to choose the correct box for packing.No
parcel_details.dimensionsAn object containing the dimension details of a parcel. See Parcel Details - Dimension Object Parameters section.Yes
parcel_details.dimension RulesFor Courierpost labels that aren't Courierpost satchels, only one of the following is required:
length_cm, width_cm, and height_cm
OR
volume_m3 (highly desirable
parcel_details.dimensions.length_cmLength of the parcel.See parcel_details.dimension rules
parcel_details.dimensions.width_cmWidth of the parcel.See parcel_details.dimension rules
parcel_details.dimensions.height_cmHeight of the parcel.See parcel_details.dimension rules
parcel_details.dimensions.volume_m3Volume of the parcel.See parcel_details.dimension rules
parcel_details.dimensions.weight_kgPhysical weight of the parcel in kilograms.Yes

Fliway Addons

The following are available Fliway addons.

Add on NameDescription
FLHDFliway Home Delivery
FLSRFliway Signature Required

Fliway Add-on Rules

The following rules apply to add-on services included in a label request:

  1. Add-on services can only be present when the carrier is Fliway.
  2. All parcel addons and return indicator must be the same when the carrier is Fliway.

Example 1: Fliway Return label for a single parcel (174x100mm)

{
    "carrier": "FLIWAY",
    "orientation": "landscape",
    "label_dimensions": "174x100",
    "account_number": "91671234",
    "format": "PDF",
    "despatch_date": "2024-10-30T09:00:00",
    "sender_reference_1": "Order1234",
    "paper_dimensions": {
        "width_cm": 15,
        "height_cm": 10
    },
    "sender_details": {
        "name": "Test Sender",
        "phone": "12345678",
        "email": "john.doe@nzpost.co.nz",
        "company_name": "NZ Post",
        "site_code": 96306
    },
    "pickup_address": {
        "address_id": 12345,
        "company_name": "TEST COMPANY",
        "xstreet": "122 Kerwyn avenue",
        "xsuburb": "East Tamaki",
        "xcity": "Auckland",
        "xstate": "AUK",
        "country_code": "NZ",
        "xpostcode": "2013",
        "FullAddressWithNameAndCompany": "NZ Post test company",
        "instructions": "test test 12345"
    },
    "receiver_details": {
        "name": "test receiver",
        "phone": "022345678",
        "email": "john.doe@nzpost.co.nz"
    },
    "delivery_address": {
        "is_collection": false,
        "building_name": "Test Delivery Building Name",
        "company_name": "Test Delivery Company Name",
        "street": "58 Eskdale Road",
        "suburb": "Papakowhai",
        "city": "Porirua",
        "country_code": "NZ",
        "postcode": "5024",
        "instructions": "Ask for Bubba at the reception."
    },
    "parcel_details": [
        {
            "service_code": "FLWY",
            "add_ons": ["FLHD","FLSR"],
            "return_indicator": "RETURN",
            "description": "MY PERSIHABLE TEST",
            "insured_valued_amount": 0,
            "currency": "nzd",
            "dimensions": {
                "length_cm": 100.0,
                "weight_kg": 31,
                "width_cm": 149.0,
                "height_cm": 10
            }
        }
    ]
}

resources/fliway1-35e91aac-7075-45b4-a0f5-fc7d7f953721.PNG

Response Parameters

Field NameDescriptionMandatory
consignment_idUnique identifier for the consignment if the request is successful.Yes
message_idA unique ID for the API callYes
successReturns true if request is successful. Returns false if request is not successful.Yes

Sample Response


{

  "consignment_id": "DVZQYF",

  "message_id": "520f4fa0-22cc-11eb-b1e1-027414412442",

  "success": true

}

\`\`\`

Reviews